package vehicle;

abstract class NonMotorizedVehicle {
    protected String color;
    protected String brand;

    public NonMotorizedVehicle(String color,String brand) {
        this.color=color;
        this.brand=brand;
    }
    public abstract void introduce();
}

class Bicycle extends NonMotorizedVehicle {
    private int seats;

    public Bicycle(String color,String brand,int seats) {
        super(color,brand);
        this.seats=seats;
    }

    @Override
    public void introduce() {
       System.out.println("This is a bicycle,its color is "+color+",its brand is "+brand+" and it has "+seats+"seats");
    }
}
class ElectricScooter extends NonMotorizedVehicle {
    private double batteryLevel;

    public ElectricScooter(String color,String brand,double batteryLevel) {
        super(color,brand);
        this.batteryLevel=batteryLevel;
    }

    @Override
    public void introduce() {
        System.out.println("This is a electricScooter,its color is "+color+",its brand is "+brand+" and its batteryLevel is "+batteryLevel);
    }
}

class Tricycle extends NonMotorizedVehicle {
    private int wheels;

    public Tricycle(String color,String brand,int wheels) {
        super(color,brand);
        this.wheels=wheels;
    }

    @Override
    public void introduce() {
        System.out.println("This is a bicycle,its color is "+color+",its brand is "+brand+" and it has "+wheels+"wheels");
    }
}

public class vehicle {
    public static void main(String[] args) {
        Bicycle bicycle=new Bicycle("blue","MARMOT",1);
        System.out.println("Bicycle Introduce: ");
        bicycle.introduce();

        ElectricScooter electricScooter=new ElectricScooter("green","AIMA",50);
        System.out.println("ElectricScooter Introduce: ");
        electricScooter.introduce();

        Tricycle tricycle=new Tricycle("red","JINPENG",1);
        System.out.println("Tricycle Introduce: ");
        tricycle.introduce();
    }
}
